<?php


namespace plugin\agent\app\task;


use plugin\agent\app\admin\logic\AgentOrderLogic;
use support\contract\ITask;
use Workerman\Crontab\Crontab;

class AgentOrderSettlement implements ITask
{
    public function start()
    {
        // 每天凌晨1点执行一次
        new Crontab('0 0 1 * * *', function () {
            $logic = new AgentOrderLogic();
            $logic->settlement(date("Ymd") . '00:00:00');
        });
    }
}